<template>
	<div class='container'>
		<p>{{ msg }}</p>
		<Child></Child>
	</div>
</template>

<script setup>
import Child from './Child.vue';
import { myInjectionKey1, myInjectionKey2 } from './symbolKeys';
import { ref, provide } from 'vue';

const msg = ref(1)
const setMsg = (val) => {
	msg.value = val;
}
const msg1 = ref('哈哈')
const msg2 = ref('圣诞节回复收到就好')
provide('useMsg', {
	msg,
	setMsg
})
provide(myInjectionKey1, msg1)
provide(myInjectionKey2, msg2)
</script>
<style lang='less' scoped>
.container {}
</style>
